package com.valentinalee.bms.web.servlet.filemanage2;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.valentinalee.bms.entity.FileSystemVO;
import com.valentinalee.bms.service.FileSystemService;
import com.valentinalee.bms.service.impl.FileSystemServiceImpl;

public class FileQueryServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		req.setCharacterEncoding("utf-8");
		
		String id = req.getParameter("id");
		FileSystemService service=new FileSystemServiceImpl();
		FileSystemVO vo = service.FileQuery(id);
		req.setAttribute("fileVo", vo);
		req.getRequestDispatcher("/jsp/file/fileInfo.jsp").forward(req, resp);
	}

	
	

}
